<fieldset style="float:left;" id="adresa_data_{{$dels_data_count}}_{{$dels_data_count1}}" komdel="{{$dels_data_komdel}}" www="{{$www_data_state}}">
  <legend>
	<input class="add" type="button" onClick="addKomdelData(this,'{{$dels_data_count}}')" value="+" />
	<input class="add" type="button" onClick="removeKomdelData(this)" value="-" />
	<input class="add" type="button" style="width:{{$www_data_width}}px; height:{{$www_data_width}}px; border:none; background:{{$komdel_data_www}}" disabled="disabled" />
  </legend>
	<div style="float:left; clear:both" id="komdel_adresa_holder_{{$dels_data_count}}_{{$dels_data_count1}}">
		<input type="hidden" id="komdel_adresa_{{$dels_data_count}}_{{$dels_data_count1}}" name="komdel_adresa_{{$dels_data_count}}_{{$dels_data_count1}}" value="{{$komdel_adresa_id}}" />
		<input class="import" type="button" onClick="importFromBasics(this,2)" value="&#10136;" title="Uvezi iz osnovnih podataka" />
		<!-- REGION -->
		<label for="komdel_region_{{$dels_data_count}}_{{$dels_data_count1}}" style="width:51px;">Region:</label>
		<select name="komdel_region_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_region_{{$dels_data_count}}_{{$dels_data_count1}}" onChange="updateSelectsAdresa(this,'region')">
			<option value="-1">---</option>
			{{%loop start region_id}}
			<option value="{{$region_id}}" {{$komdel_selected_region}}>{{$region_name}}</option>
			{{%loop end}}
		</select>
		<!-- OPSTINA -->
		<label for="komdel_opstina_{{$dels_data_count}}_{{$dels_data_count1}}">Opština:</label>
		<select name="komdel_opstina_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_opstina_{{$dels_data_count}}_{{$dels_data_count1}}" onChange="updateSelectsAdresa(this,'opstina')">
			<option value="-1">---</option>
			{{%loop start opstina_id}}
			<option parent="{{$opstina_parent}}" value="{{$opstina_id}}" {{$komdel_selected_opstina}}>{{$opstina_name}}</option>
			{{%loop end}}
		</select>
		<br clear="all" />
		<!-- MESTO -->
		<label for="komdel_mesto_{{$dels_data_count}}_{{$dels_data_count1}}">Mesto:</label>
		<select name="komdel_mesto_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_mesto_{{$dels_data_count}}_{{$dels_data_count1}}" onChange="updateSelectsAdresa(this,'grad')">
			<option value="-1">---</option>
			{{%loop start mesto_id}}
			<option parent="{{$mesto_parent}}" value="{{$mesto_id}}" ptt="{{$mesto_ptt}}" {{$komdel_selected_mesto}}>{{$mesto_name}}</option>
			{{%loop end}}
		</select>
		<!-- LOKALNA OPSTINA -->
		<label for="komdel_lok_opstina_{{$dels_data_count}}_{{$dels_data_count1}}">Lok.Opština:</label>
		<select name="komdel_lok_opstina_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_lok_opstina_{{$dels_data_count}}_{{$dels_data_count1}}" onChange="updateSelectsAdresa(this,'lok_opstina')" {{$diz}} >
			<option value="-1">---</option>
			{{%loop start lok_opstina_id}}
			<option parent="{{$lok_opstina_parent}}" value="{{$lok_opstina_id}}" ptt="{{$lok_opstina_ptt}}" {{$komdel_selected_lok_opstina}}>{{$lok_opstina_name}}</option>
			{{%loop end}}
		</select><br clear="all" />
		<!-- NASELJE -->
		<label for="komdel_naselje_{{$dels_data_count}}_{{$dels_data_count1}}">Naselje:</label>
		<select name="komdel_naselje_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_naselje_{{$dels_data_count}}_{{$dels_data_count1}}" onchange="updateSelectsAdresa(this,'naselje')">
			<option value="-1">---</option>
			{{%loop start naselje_id}}
			<option parent="{{$naselje_parent}}" value="{{$naselje_id}}" ptt="{{$naselje_ptt}}" {{$komdel_selected_naselje}}>{{$naselje_name}}</option>
			{{%loop end}}
		</select><br clear="all" />
		<!-- ULICA I BR -->
		<label for="sel_komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}">Ulica:</label>
		<input type="text" disabled="disabled" name="komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}" onKeyUp="if(event.keyCode==32){ showSelect(this,'classes/fetch.php?a=ulice','updateFloatSelect(\'komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}\',\'komdel_ulica_id_{{$dels_data_count}}_{{$dels_data_count1}}\')')}" value="{{$komdel_ulica}}" onchange="this.value = trim(this.value); var obj_ul_id = document.getElementById('komdel_ulica_id_{{$dels_data_count}}_{{$dels_data_count1}}'); obj_ul_id.value='';" />
		<input type="hidden" id="komdel_ulica_id_{{$dels_data_count}}_{{$dels_data_count1}}" name="komdel_ulica_id_{{$dels_data_count}}_{{$dels_data_count1}}" value="{{$komdel_ulica_id}}" />
		<input id="sel_komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}" type="button" class="btnUlicaSelect" onclick="searchUlice(this,'komdel_ulica_{{$dels_data_count}}_{{$dels_data_count1}}','komdel_ulica_id_{{$dels_data_count}}_{{$dels_data_count1}}','','komdel_mesto_{{$dels_data_count}}_{{$dels_data_count1}}','komdel_lok_opstina_{{$dels_data_count}}_{{$dels_data_count1}}','komdel_naselje_{{$dels_data_count}}_{{$dels_data_count1}}')" title="promenite ulicu" />
		<!--<input type="button" style="background-color:transparent; border:none; cursor:pointer;" class="delete" onclick="var _ulid=this.previousSibling.previousSibling.previousSibling.previousSibling; var _ul=_ulid.previousSibling.previousSibling; _ul.value=''; _ulid.value='-1';" />-->
		<label for="komdel_broj_{{$dels_data_count}}_{{$dels_data_count1}}" class="second">Broj:</label>
		<input style="width:30px;" type="text" name="komdel_broj_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_broj_{{$dels_data_count}}_{{$dels_data_count1}}" value="{{$komdel_broj}}" />
		<span style="margin-left:100px; width:40px; height:20px; overflow:hidden;" id="komdel_ptt_{{$dels_data_count}}_{{$dels_data_count1}}" class="ptt" title="poštanski broj">{{$mesptt_selected}}</span>
		<span style="margin-left:80px;">PTT:</span>
		<br clear="all" />
		<!-- TELEFON -->
		<label for="komdel_tel_{{$dels_data_count}}_{{$dels_data_count1}}">Telefon:</label>
		<textarea name="komdel_tel_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_tel_{{$dels_data_count}}_{{$dels_data_count1}}" rule="^(0{1}\d{2,3} \d{3} \d{2,4})*$|^(9\d{3})*$|^(0{1}\d{2,3} 9{1}\d{2,3})*$" type="multiItem">{{$komdel_tel}}</textarea>
		<!-- FAKS -->
		<label for="komdel_faks_{{$dels_data_count}}_{{$dels_data_count1}}" class="second_row">Faks:</label>
		<textarea name="komdel_faks_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_faks_{{$dels_data_count}}_{{$dels_data_count1}}" rule="^(0{1}\d{2,3} \d{3} \d{2,4})*$" type="multiItem">{{$komdel_fax}}</textarea><br clear="all" />
	</div>
	<div style="float:left; margin-left:10px; padding-left:10px; border-left:1px dotted #9a9980;">
		<!-- RADNO VREME -->
		<div class="fieldset" id="rvreme" title="Radno vreme" style="width:auto; margin:0px 0px 0px 30px; clear:none;">
			<label for="komdel_rvreme_dan_{{$dels_data_count}}_{{$dels_data_count1}}">Radnim danom:</label><input type="text" name="komdel_rvreme_dan_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_rvreme_dan_{{$dels_data_count}}_{{$dels_data_count1}}" maxlength="15" value="{{$komdel_rvreme_rdan}}" /><br clear="all" />
			<label for="komdel_rvreme_subota_{{$dels_data_count}}_{{$dels_data_count1}}">Subotom:</label><input type="text" name="komdel_rvreme_subota_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_rvreme_subota_{{$dels_data_count}}_{{$dels_data_count1}}" maxlength="15" value="{{$komdel_rvreme_sub}}" /><br clear="all" />
			<label for="komdel_rvreme_nedelja_{{$dels_data_count}}_{{$dels_data_count1}}">Nedeljom:</label><input type="text" name="komdel_rvreme_nedelja_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_rvreme_nedelja_{{$dels_data_count}}_{{$dels_data_count1}}" maxlength="15" value="{{$komdel_rvreme_ned}}" /><br clear="all" />
		</div>
		<div class="fieldset" id="kartice" title="Platne kartice" style="clear:none; width:auto; margin:0px 0px 0px 10px;">
			<spacer type="block" height="20" />
			<!-- PLATNE KARTICE -->
			<select name="komdel_select_cards_{{$dels_data_count}}_{{$dels_data_count1}}" id="komdel_select_cards_{{$dels_data_count}}_{{$dels_data_count1}}">
				{{%loop start card_id}}
				<option value="{{$card_id}}" onMouseOver="window.status = this.value">{{$card_name}}</option>
				{{%loop end}}
			</select>
			<input type="button" class="add" value="+" onClick="komitentAddCard(this)" style="margin-top:5px; " />
			<input type="button" class="add" value="-" onClick="komitentRemoveCard(this)" style="margin:5px 0px 0px 5px; " /><br clear="all" />
			<ul id="komdel_cards_{{$dels_data_count}}_{{$dels_data_count1}}" class="listBox">
				{{%loop start komdel_card_id}}
					{{$card_li}}
				{{%loop end}}
			</ul>
		</div>
		<br clear="all" />
	</div>
</fieldset>